<?php get_header(); ?>

<?php if (have_posts()) : ?>
  
	<?php while (have_posts()) : the_post(); ?>

	<!-- post -->
	<article <?php post_class(); ?> id="post-<?php the_ID(); ?>">
		<header><h1 class="post-title"><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h1></header>
		<div class="post-text">
		<?php
		if(is_single()) {
			the_content("Read the full article &raquo;");
		} elseif (is_archive() || is_category() || is_day() || is_month() || is_year() || is_search() || is_tag()) {
			fp_options('typeArchive');
		} else {
			fp_options('typeFront');
			wp_link_pages('before=<div class="post-pages">Pages:&after=</div>&next_or_number=number&pagelink=<span>%</span>');
		} ?>
		</div>
		<footer class="post-meta">
			<div class="row">
				<?php if ('open' == $post->comment_status) { comments_popup_link('No Comments', '1 Comment', '% Comments', 'post-comments',''); } ?>
				<!--<span class="post-author">by <?php the_author_posts_link() ?> on </span>-->
				<em><?php the_time('F j, Y') ?></em><?php edit_post_link('Edit Post', ' &nbsp;&bull;&nbsp; ', ''); ?>
			</div>
			<!--<div class="row"><strong><?php the_category(', ') ?></strong></div>-->
			<div class="row"><?php the_tags('#', ', #', '');?></div>
		</footer>
	</article>
	<!--/post -->

	<?php if (is_single()) { ?>
	<nav class="post post-nav">
		<?php previous_post_link('<div class="alignleft"><i>Previous post</i><br />%link</div>'); ?>
		<?php next_post_link('<div class="alignright"><i>Next post</i><br />%link</div>'); ?>
	</nav>
	<?php } ?>

<?php comments_template(); ?>
		
	<?php endwhile; ?>

	<nav class="navigation">
		<div class="alignleft"><?php next_posts_link('&laquo; Older Posts') ?></div>
		<div class="alignright"><?php previous_posts_link('Newer Posts &raquo;') ?></div>
	</nav>

	<?php else : ?>

	<article class="post">
		<header><h1 class="post-title">Not Found</h1></header>
		<div class="post-text">
			<p>The page you were looking for could not be found.</p>
		</div>
	</article>
		
<?php endif; ?>

<?php get_footer(); ?>
